package com.dc.project.demo.service;

import com.dc.project.demo.dto.PmAttributeFormDTO;
import com.dc.project.demo.po.PmAttribute;
import com.dc.project.demo.query.PmAttributeQuery;
import com.dc.project.demo.vo.PmAttributeVO;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 属性接口
 *
 * @author Enzo
 * @date 2020-7-8
 */
public interface PmAttributeService {

    /**
     * 新增
     *
     * @param dto
     * @return com.dc.project.core.po.PmAttribute
     * @author Enzo
     * @date 2023/4/28
     **/
    PmAttribute insertData(PmAttributeFormDTO dto);

    /**
     * 修改
     *
     * @param dto
     * @return com.dc.project.core.po.PmAttribute
     * @author Enzo
     * @date 2023/4/28
     **/
    PmAttribute updateData(PmAttributeFormDTO dto);

    /**
     * 删除属性
     *
     * @param pk
     * @return int
     * @author Enzo
     * @date 2020-7-8
     **/
    int deleteData(String pk);

    /**
     * 批量删除
     *
     * @param ids
     * @return int
     * @author Enzo
     * @date 2023/4/28
     **/
    int deleteBatch(List<String> ids);

    /**
     * 根据主键id获取属性信息
     *
     * @param pk
     * @return com.dc.demo.pm.po.PmAttribute
     * @author Enzo
     * @date 2020-7-8
     **/
    PmAttribute getById(String pk);


    /**
     * 分页查询属性列表
     *
     * @param query
     * @return com.github.pagehelper.PageInfo<com.dc.demo.pm.po.PmAttribute>
     * @author Enzo
     * @date 2020-7-8
     **/
    PageInfo<PmAttribute> pageData(PmAttributeQuery query);

    /**
     * 导入
     *
     * @param excelFile
     * @return java.util.List<com.dc.project.core.dto.PmAttributeFormDTO>
     * @author Enzo
     * @date 2023/4/28
     **/

    List<PmAttributeFormDTO> importData(MultipartFile excelFile);

    /**
     * 导出
     *
     * @param query
     * @return java.lang.String
     * @author Enzo
     * @date 2023/4/28
     **/
    String exportData(PmAttributeQuery query);

    /**
     * 查询我的消息
     *
     * @param query
     * @return com.github.pagehelper.PageInfo<com.dc.project.core.po.PmAttribute>
     * @author Enzo
     * @date 2023/4/28
     **/
    PageInfo<PmAttributeVO> pageMyMsg(PmAttributeQuery query);
}
